package Mypackage;


import com.intellij.lang.Language;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
//import com.sylvanaar.idea.Lua.editor.highlighter.LuaEditorHighlighter;
//import com.sylvanaar.idea.Lua.lang.LuaLanguage;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: Max
 * Date: 04.07.2009
 * Time: 1:03:43
 */
public class PerlFileType extends LanguageFileType {
    public static final PerlFileType PERL_FILE_TYPE = new PerlFileType();

    public static final Language PERL_LANGUAGE = PERL_FILE_TYPE.getLanguage();
    // public static final Icon LUA_FILE_TYPE = LuaIcons.LUA_ICON_16x16;
    @NonNls
    public static final String DEFAULT_EXTENSION = "pl";

    private PerlFileType() {
        super(new PerlLanguage());
    }

    /**
     * Creates a language file type for the specified language.
     *
     * @param language The language used in the files of the type.
     */
    protected PerlFileType(@NotNull Language language) {
        super(language);
    }

    public EditorHighlighter getEditorHighlighter(@Nullable Project project, @Nullable VirtualFile virtualFile, @NotNull EditorColorsScheme colors) {
        return null;//new LuaEditorHighlighter(colors, project, virtualFile);
    }

    @NotNull
    public String getName() {
        return "Perl file type";
    }

    @NotNull
    public String getDescription() {
        return "Perl source file";
    }

    @NotNull
    public String getDefaultExtension() {
        return DEFAULT_EXTENSION;
    }

    public Icon getIcon() {
        return null;//LuaIcons.LUA_ICON;
    }

}



